package com.lianbang.staff.http.api

import cn.ubest.mvvmcore.bean.ListWrapper
import cn.ubest.mvvmcore.bean.ResultWrapper
import cn.ubest.mvvmcore.bean.Wrapper
import com.lianbang.staff.bean.ShopDetailBean
import com.lianbang.staff.bean.ShopListBean
import com.lianbang.staff.bean.ShopOrderDetailBean
import com.lianbang.staff.bean.ShopOrderListBean
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * Created by maoqi on 2021/1/14.
 */
interface ShopApi{

    //门店列表
    @FormUrlEncoded
    @POST("salesman_api/user_list")
    suspend fun getShopList(
        @Field("keyword") keyword: String,
        @Field("page") page: Int,
        @Field("limit") limit: Int,
        @Field("order") order: String
    ): ListWrapper<ShopListBean>

    //门店详情
    @FormUrlEncoded
    @POST("salesman_api/user_info")
    suspend fun getShopDetail(
        @Field("uid") uid: Int
    ): ResultWrapper<ShopDetailBean>

    //门店订单列表
    @FormUrlEncoded
    @POST("salesman_api/user_orderlist")
    suspend fun getShopOrderList(
        @Field("uid") uid: Int,
        @Field("keyword") keyword: String,
        @Field("page") page: Int,
        @Field("limit") limit: Int,
        @Field("order") order: String
    ): ListWrapper<ShopOrderListBean>


}